from gameset.phoenicia.base import *

from ..agriculture import AnimalGood, AnimalRange, Field, InediblePlant, RanchAnimal


class Cloth(ProcessedMaterial):
    singular  =_ ('Cloth')
    plural    =_ ('Cloth')


class Fleece(Cloth, AnimalGood):
    singular  =_ ('Fleece')
    plural    =_ ('Fleece')
    happiness =_ (1.0)
    consumed  =_ (0.5)
    quality   =_ (0.2)


class Linen(Cloth):
    singular  =_ ('Linen')
    plural    =_ ('Linen')
    happiness =_ (1.0)
    consumed  =_ (0.4)
    quality   =_ (0.4)


class Silk(Cloth):
    singular  =_ ('Silk')
    plural    =_ ('Silk')
    happiness =_ (2.0)
    consumed  =_ (0.1)
    quality   =_ (0.7)


class Sheep(RanchAnimal):
    color    =_ (White)
    capacity =_ (250)
    produces =_ (Fleece)
    meat     =_ (20)


class SheepRange(AnimalRange):
    name   =_ ('Sheep Range')
    color  =_ (White + Black)
    animal =_ (Sheep)


class Flax(InediblePlant):
    singular  =_ ('Flax')
    plural    =_ ('Flax')


class FlaxField(Field):
    name        =_ ('Flax Field')
    
    color         =_ (Pink)
    plant         =_ (Flax)
    seed_month    =_ (8)
    harvest_month =_ (4)
    max_seeds     =_ (200)
    weed_chance   =_ (4)
    resistance    =_ (0.4)


class Weavery(Workshop):
    name     =_ ('Weavery')
    color    =_ (White + Pink)
    cost     =_ (150)
    size     =_ (2)
    staff    =_ (8)
    produces =_ (Production(input = Flax(1), output = Linen(1), duration = 0.3))
